<?php
namespace app\common\validate;

use think\Validate;

class RedPacket extends Validate
{
    protected $rule = [
        'num' => 'require|number',
        'price' => 'require|number',
        'issue_time' => 'require|dateFormat:Y-m-d H:i',
        'jump' => 'require|in:1,2,3',
        'sex' => 'in:0,1,2',
        'pay_type' => 'require|in:0,1,2',
    ];
    protected $message = [
        'num.require' => '请输入红包数量',
        'num.number' => '红包数量格式有误',
        'price.require' => '请输入金额',
        'price.number' => '输入的金额格式错误',
        'issue_time.require' => '请选择发布时间',
        'issue_time.dateFormat' => '发布时间格式错误',
        'jump.require' => '请选择跳转分类',
        'jump.in' => '跳转分类有误',
        'sex.in' => '性别有误',
        'pay_type.require' => '请选择支付方式',
        'pay_type.in' => '支付方式错误'
    ];
    protected $scene = [
       
    ];
}
